/**
 ----------------------
 1.当前文件用于编辑表单
 2.提供表单相关属性
 3. @param xxxFormConfig.current 指向当前选中的数据
 ----------------------
 */
import type {AxTest} from '@/api/modules/ax/test/types';
import type {Rule} from 'ant-design-vue/es/form/interface';
import {useAxForm} from '@/utils/common/hooks';

const testFormObj: AxTest = {
        testId: 0 ,
        district: "" ,
        imageField: "" ,
        mdField: null ,
        cardCover: "" ,
        remark: "" ,
        model: "" ,
        createTime: null ,
        updateTime: null ,
};

// 表格校验
export const testRules: Record<string, Rule[]> = {
    testId: [{required: false , trigger: 'change'}],
    district: [{required: false , trigger: 'change'}],
    imageField: [{required: false , trigger: 'change'}],
    mdField: [{required: false , trigger: 'change'}],
    cardCover: [{required: false , trigger: 'change'}],
    remark: [{required: false , trigger: 'change'}],
    model: [{required: false , trigger: 'change'}],
    createTime: [{required: false , trigger: 'change'}],
    updateTime: [{required: false , trigger: 'change'}],
};
export const testFormConfig = useAxForm<AxTest>(testFormObj);
export const testFormRef = ref()